<?php
namespace App\Http\Service\Recharge;


use App\Http\Service\Basic\BasicService;
use Config;

class RechargeService extends BasicService
{

    //构造函数
    function __construct()
    {
        parent::__construct();
    }

    //微信充值
    public function WxRecharge($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.wx_recharge'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.wx_recharge'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }


    //支付宝充值
    public function AliRecharge($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.ali_recharge'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.ali_recharge'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }


    /**
     * @param $where
     * @return bool|mixed|string
     * 检测充值订单状态
     */
    public function CheckRechargeStatus($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.check_wechat_recahrge_status'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.check_wechat_recahrge_status'),json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }


}